package com.example.eureka.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.example.eureka.domain.Food;
import com.example.eureka.service.OrderService;

@RestController
public class OrderController {
	
	@Autowired
	private OrderService orderService;

	@RequestMapping(value = "/orderFood/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public Food getFoodInfo(@PathVariable int id) {
		Food food=orderService.queryFoodInfoById(id);
		return food;
	}
}
